﻿using AntDesign;
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace RemoteSensingImageDirectServer.Models.Map.Cache
{
    //联合索引
    [Index(nameof(Filename), nameof(EPSG))]
    public class SingleImageCache
    {
        /// <summary>
        /// 缓存单景图层主键
        /// </summary>
        [Key]
        public string Key { get; set; }

        /// <summary>
        /// 单景数据文件路径
        /// </summary>
        public string Filename { get; set; }

        /// <summary>
        /// 投影文件编码
        /// </summary>
        public int EPSG { get; set; }

        /// <summary>
        /// Warp投影变换后的数据(此数据在多线程模式下数据不安全，容易丢内存)
        /// </summary>
        public byte[]? WarpData { get; set; }

        /// <summary>
        /// 支持多线程共同访问的数据(多线程加速)
        /// </summary>
        public byte[] VrtData { get; set; }

    }
}
